Optimal. Leaf size=307 \[ -\frac {\left (A b^2-a b B+3 a^2 C-2 b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 \left (a^2-b^2\right ) d}-\frac {\left (A b^2-a (b B-a C)\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a b \left (a^2-b^2\right ) d}+\frac {\left (A b^4+a^3 b B-3 a b^3 B-3 a^4 C+a^2 b^2 (A+5 C)\right ) \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a b^2 (a+b) \left (a^2-b^2\right ) d}+\frac {\left (A b^2-a b B+3 a^2 C-2 b^2 C\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.75, antiderivative size = 307, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {4197, 3134,
3138, 2719, 3081, 2720, 2884} \begin {gather*} -\frac {F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (A b^2-a (b B-a C)\right )}{a b d \left (a^2-b^2\right )}-\frac {E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (3 a^2 C-a b B+A b^2-2 b^2 C\right )}{b^2 d \left (a^2-b^2\right )}+\frac {\sin (c+d x) \left (3 a^2 C-a b B+A b^2-2 b^2 C\right )}{b^2 d \left (a^2-b^2\right ) \sqrt {\cos (c+d x)}}-\frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {\cos (c+d x)} (a \cos (c+d x)+b)}+\frac {\left (-3 a^4 C+a^3 b B+a^2 b^2 (A+5 C)-3 a b^3 B+A b^4\right ) \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a b^2 d (a+b) \left (a^2-b^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 2884
Rule 3081
Rule 3134
Rule 3138
Rule 4197
Rubi steps
\begin {align*} \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (a+b \sec (c+d x))^2} \, dx &=\int \frac {C+B \cos (c+d x)+A \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (b+a \cos (c+d x))^2} \, dx\\ &=-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (b+a \cos (c+d x))}-\frac {\int \frac {\frac {1}{2} \left (-A b^2+a b B-3 a^2 C+2 b^2 C\right )+b (b B-a (A+C)) \cos (c+d x)+\frac {1}{2} \left (A b^2-a (b B-a C)\right ) \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (b+a \cos (c+d x))} \, dx}{b \left (a^2-b^2\right )}\\ &=\frac {\left (A b^2-a b B+3 a^2 C-2 b^2 C\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (b+a \cos (c+d x))}-\frac {2 \int \frac {\frac {1}{4} \left (-a^2 b B+2 b^3 B+3 a^3 C-a b^2 (A+4 C)\right )+\frac {1}{2} b \left (A b^2-a b B+2 a^2 C-b^2 C\right ) \cos (c+d x)+\frac {1}{4} a \left (A b^2-a b B+3 a^2 C-2 b^2 C\right ) \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{b^2 \left (a^2-b^2\right )}\\ &=\frac {\left (A b^2-a b B+3 a^2 C-2 b^2 C\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (b+a \cos (c+d x))}+\frac {2 \int \frac {\frac {1}{4} a \left (a^2 b B-2 b^3 B-3 a^3 C+a b^2 (A+4 C)\right )-\frac {1}{4} a b \left (A b^2-a (b B-a C)\right ) \cos (c+d x)}{\sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{a b^2 \left (a^2-b^2\right )}-\frac {\left (A b^2-a b B+3 a^2 C-2 b^2 C\right ) \int \sqrt {\cos (c+d x)} \, dx}{2 b^2 \left (a^2-b^2\right )}\\ &=-\frac {\left (A b^2-a b B+3 a^2 C-2 b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 \left (a^2-b^2\right ) d}+\frac {\left (A b^2-a b B+3 a^2 C-2 b^2 C\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (b+a \cos (c+d x))}+\frac {\left (A b^4+a^3 b B-3 a b^3 B-3 a^4 C+a^2 b^2 (A+5 C)\right ) \int \frac {1}{\sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{2 a b^2 \left (a^2-b^2\right )}-\frac {\left (A b^2-a (b B-a C)\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{2 a b \left (a^2-b^2\right )}\\ &=-\frac {\left (A b^2-a b B+3 a^2 C-2 b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 \left (a^2-b^2\right ) d}-\frac {\left (A b^2-a (b B-a C)\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a b \left (a^2-b^2\right ) d}+\frac {\left (A b^4+a^3 b B-3 a b^3 B-3 a^4 C+a^2 b^2 (A+5 C)\right ) \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a (a-b) b^2 (a+b)^2 d}+\frac {\left (A b^2-a b B+3 a^2 C-2 b^2 C\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (b+a \cos (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 15.49, size = 337, normalized size = 1.10 \begin {gather*} \frac {-\frac {\frac {2 \left (-3 a^2 b B+4 b^3 B+9 a^3 C-a b^2 (A+10 C)\right ) \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a+b}+\frac {4 b \left (A b^2-a b B+2 a^2 C-b^2 C\right ) \left (2 F\left (\left .\frac {1}{2} (c+d x)\right |2\right )-\frac {2 b \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a+b}\right )}{a}+\frac {2 \left (A b^2-a b B+3 a^2 C-2 b^2 C\right ) \left (-2 a b E\left (\left .\text {ArcSin}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )+2 b (a+b) F\left (\left .\text {ArcSin}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )+\left (a^2-2 b^2\right ) \Pi \left (-\frac {a}{b};\left .\text {ArcSin}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )\right ) \sin (c+d x)}{a b \sqrt {\sin ^2(c+d x)}}}{(a-b) (a+b)}+4 \sqrt {\cos (c+d x)} \left (\frac {a \left (A b^2+a (-b B+a C)\right ) \sin (c+d x)}{\left (a^2-b^2\right ) (b+a \cos (c+d x))}+2 C \tan (c+d x)\right )}{4 b^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(869\) vs.
\(2(381)=762\).
time = 0.36, size = 870, normalized size = 2.83
method | result | size |
default | \(\text {Expression too large to display}\) | \(870\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{{\cos \left (c+d\,x\right )}^{3/2}\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________